<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta
      content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
      name="viewport"
    />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>Document</title>
    <link rel="stylesheet" href="./less/css/public.css" />
    <link rel="stylesheet" href="./less/css/public-item.css" />
    <!-- weback打包成cdn -->
    <link
      rel="stylesheet"
      href="./lib/swiper-5.2.0/package/css/swiper.min.css"
    />
  </head>
  <body>
    <!-- logo -->
    <div class="logo" onclick="goPage('introductionPage')">
      <img src="./img/logo.png" alt="" />
    </div>
    <!-- 二维码 -->
    <div class="code">
      <div class="title">· 二维码 ·</div>
      <div class="qrCode">
        <img src="./img/QRcode.jpg" alt="" />
      </div>
    </div>
    <!-- 返回 -->
    <div class="back" onclick="backIndex()">
      <img src="./img/back.png" alt="" />
    </div>
    <!-- 主体内容 -->
    <div class="main1" onclick="lookDetail(1)">
      <div class="title">· 源头分类 ·</div>
      <div class="content">
        <div class="swiper-container">
          <div class="swiper-wrapper"></div>
        </div>
      </div>
    </div>
    <div class="main2" onclick="lookDetail(2)">
      <div class="title">· 中端收运 ·</div>
      <div class="content">
        <div class="swiper-container">
          <div class="swiper-wrapper"></div>
        </div>
      </div>
    </div>
    <div class="main3" onclick="lookDetail(3)">
      <div class="title">· 末端处理 ·</div>
      <div class="content">
        <div class="swiper-container">
          <div class="swiper-wrapper"></div>
        </div>
      </div>
    </div>
    <script src="./js/public.js"></script>
    <script src="./lib//swiper-5.2.0/package/js/swiper.min.js"></script>
    <script src="./js/data/item3.js"></script>
    <script src="./lib/template.js"></script>
    <!-- 最好的两款模板引擎软件是:juicer(官方已经废弃了)和art-template -->
    <script id="getheros" type="text/template">
       {{ each list }}
       <div class="swiper-slide">
          <img src="{{$value}}" alt="" onclick="imagePreview(this, initSwiper)" />
        </div>
      {{ /each}}
    </script>
    <script>
      function lookDetail(current) {
        location.href = './item30.html?index=' + current
      }
      function initSwiper() {
        for (var i = 1; i <= 3; i++) {
          var htnlStr = template('getheros', {
            list: [item31, item32, item33][i - 1]
          })
          document.querySelector(
            '.main' + i + ' .swiper-wrapper'
          ).innerHTML = htnlStr
        }

        var mySwiper = new Swiper('.swiper-container', {
          slidesPerView: 4 // 设置slider容器能够同时显示的slides数量(carousel模式)。
        })
      }
      initBigImg()
      initSwiper()
    </script>
  </body>
</html>
